package com.health.mapper;

import com.health.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.health.entity.pojo.dto.UserDTO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author sanchuan
 * @since 2023-04-22
 */
public interface UserMapper extends BaseMapper<User> {

    List<User> listUserPage(@Param("userDTO") UserDTO userDTO);


    Boolean banUserForever(@Param("isLock") Integer isLock,@Param("ids") List<Integer> ids);

    @Update("UPDATE `user` SET is_lock = 0 WHERE id = #{userId}")
    Boolean unblockingUser(@Param("userId") Integer userId);
}
